import request from "@/utils/request";

export function getCaptchaImg() {
  return request({
    url: '/captcha',
    method: 'get'
  })
}

export function resetPassword(data) {
  return request({
    url: '/password',
    method: 'put',
    data
  })
}

export function login(data) {
  return request({
    url: '/login',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: '/detail',
    method: 'get'
  })
}

// 查询登录用户菜单权限列表
export function getRoutersByLoginUser() {
  return request({
    url: '/router',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/logout',
    method: 'delete'
  })
}
